<%@ page language="java" pageEncoding="utf8"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean"%> 
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic"%>
<html> 
	<head>
		<META http-equiv=Content-Type content="text/html; charset=utf-8">

		<LINK href="../styles/stylewang.css"  type=text/css rel=stylesheet>
		
		<title>Query</title>
	</head>
	  <script language="javaScript" src="../js/calendar.js"></script>
	<body>
		<html:form action="/query">
			regUserId : <html:select size="1" property="regUserId">
							<html:option value="0">
								<bean:message key="selectall" />
							</html:option>
							<html:options  collection="Regusers"
								   property="regUserId"
								   labelProperty="regName"/>
						</html:select><br/>
			operateType : <html:select property="operateType">
							<html:option value="0">
								<bean:message key="selectall" />
							</html:option>
						  	<html:option value="1">
								<bean:message key="log.LOGIN" />
							</html:option>
							
							<html:option value="3">
								<bean:message key="log.MODIFY" />
							</html:option>
							<html:option value="4">
								<bean:message key="log.ADD" />
							</html:option>
							<html:option value="5">
								<bean:message key="log.DELETE" />
							</html:option>
						  </html:select><br/>
			startTime : <html:text property="startTime"  size="20" readonly="true"  onclick="showcalendar(event, this)" onfocus="showcalendar(event, this)"/><br/>
			endTime : <html:text property="endTime"  size="20" readonly="true"  onclick="showcalendar(event, this)" onfocus="showcalendar(event, this)"/><br/>
			<html:submit/>
		</html:form>
		<logic:notEmpty name="Logs">
		<table>
			<tr>
				<td id="onlybt">Author</td>
				<td id="onlybt">Action</td>
				<td id="onlybt">Date</td>
				<td id="onlybt">Operate</td>
				<td id="onlybt">Type</td>
				<td id="onlybt">ID</td>
				
			</tr>
			<logic:iterate id="log" name="Logs">
			<tr>
				<td id="leftcenter"><bean:write name="log" property="reguser.regName"/> </td>
				<td id="leftcenter">&nbsp;
					<logic:equal name="log" property="operateType" value="1"><bean:message key="log.LOGIN"/></logic:equal>
					<logic:equal name="log" property="operateType" value="3"><bean:message key="log.MODIFY"/></logic:equal>
					<logic:equal name="log" property="operateType" value="4"><bean:message key="log.ADD"/></logic:equal>
					<logic:equal name="log" property="operateType" value="5"><bean:message key="log.DELETE"/></logic:equal>
				</td>
				<td id="leftcenter">&nbsp;<bean:write name="log" property="createTime"/></td>
				<td id="leftcenter">&nbsp;<bean:write name="log" property="operation"/></td>
				<td id="leftcenter">&nbsp;<bean:write name="log" property="objectType"/></td>
				<td id="rightcenter">&nbsp;<bean:write name="log" property="objectId"/></td>
				
			</tr>
			</logic:iterate>
			<tr>
			<td colspan="6">
         	<table width="100%" border="0" cellspacing="0" cellpadding="0" id="tdtop">
            	<tr>
            	  <td></td>
             	</tr>
         	</table>
        	</td>
        	</tr>
		</table>
		</logic:notEmpty>
	</body>
</html>

